package middleware

import (
	"net/http"
)

type UsercheckMiddleware struct {
}

func NewUsercheckMiddleware() *UsercheckMiddleware {
	return &UsercheckMiddleware{}
}
//这边的定义信息是比较方便的
func (m *UsercheckMiddleware) Handle(next http.HandlerFunc) http.HandlerFunc {
	return func(w http.ResponseWriter, r *http.Request) {
		// TODO generate middleware implement function, delete after code implementation

		//如果是jwt 必须是以来这个看请求是否是正确的jwt信息
		//info:=jwt.EncodeSegment([]byte("222223"))
		//logx.Infof("当前信息为: %s %s",r.URL.Path,info)
		//这里也是调用的useRPc服务信息返回的是 user_id 基本信息和jwt-和加密的返回的user_id
		// 其实本身也没有什么东西
		// Passthrough to next handler if need
		next(w, r)
	}
}
